package pers.wensheng.patterns.structural_pattern.decorator_pattern.decorator;

import pers.wensheng.patterns.structural_pattern.decorator_pattern.entity.FastFood;

/**
 * 肉类
 * 米饭加肉
 */
public class Meat extends Garnish {
    public Meat(FastFood fastFood) {
        super(fastFood, 6, "肉");
    }

    /**
     * 计算价格的方法
     *
     * @return
     */
    @Override
    public float cost() {
        return getFastFood().cost()+getPrice();
    }
}
